package org.jeecg.modules.goods.rfqmanage.service;

import org.jeecg.modules.goods.rfqmanage.entity.RfqManage;
import org.jeecg.modules.goods.rfqmanage.dto.AuditRequestDto;
import org.jeecg.modules.goods.rfqmanagedetail.entity.RfqManageDetail;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;

/**
 * @Description: 询报价主信息
 * @Author: jeecg-boot
 * @Date:   2025-06-07
 * @Version: V1.0
 */
public interface IRfqManageService extends IService<RfqManage> {

    /**
     * 保存或更新询报价信息（包含明细）
     * @param rfqManage 主信息
     * @param rfqManageDetailList 明细信息列表
     * @return 操作结果
     */
    boolean saveOrUpdateWithDetail(RfqManage rfqManage, List<RfqManageDetail> rfqManageDetailList);

    /**
     * 根据ID查询询报价信息（包含明细）
     * @param id 主键ID
     * @return 询报价信息（包含明细）
     */
    RfqManageWithDetailVo queryWithDetailById(String id);

    /**
     * 审核单据
     * @param auditRequest 审核请求参数
     * @param currentUser 当前用户
     * @return 审核结果
     */
    boolean auditRfq(AuditRequestDto auditRequest, String currentUser);

    /**
     * 询报价主信息和明细信息的VO类
     */
    class RfqManageWithDetailVo {
        private RfqManage rfqManage;
        private List<RfqManageDetail> rfqManageDetailList;

        public RfqManage getRfqManage() {
            return rfqManage;
        }

        public void setRfqManage(RfqManage rfqManage) {
            this.rfqManage = rfqManage;
        }

        public List<RfqManageDetail> getRfqManageDetailList() {
            return rfqManageDetailList;
        }

        public void setRfqManageDetailList(List<RfqManageDetail> rfqManageDetailList) {
            this.rfqManageDetailList = rfqManageDetailList;
        }
    }
}
